<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
if ($_POST['action'] == 'ajax') {
    $con = mysql_connect('localhost', 'root', '');
    if (!$con) {      
        die('Could not connect: ' . mysql_error());
    }
    mysql_select_db("bookgoodsdb", $con);
    $query = mysql_query("SELECT COUNT(*) FROM goodsorder WHERE isnew = '1'");
    $result = mysql_result($query, 0, 0);
    echo $result;
}
?>
